﻿using System;
using System.Linq;

namespace ggHD.Domain.Repisitories
{
    public interface IRepository<TEntity, TKey> where TEntity : class
    {
        TEntity Get(TKey key);
        IQueryable<TEntity> Select(Func<TEntity, bool> predicate);
        IQueryable<TEntity> All { get; }

        int Insert(TEntity entity);
        int Update(TEntity entity);
        int Delete(TKey key);
    }
}
